<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
   <%@taglib prefix="s" uri="/struts-tags" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>商品一览页面</title>
<link href="/ssh/css/forword.css" type="text/css" rel="stylesheet">
<script type="text/javascript">
//删除提示
function confirmDel(str){   
 return confirm(str);   
	} 
</script>
</head>
<body>
<!-- 头部的包含文件 -->
<%@include file="../commonq/myhead.jsp" %>
<table class="main">
	<tr>
		<td style="width:200px;vertical-align:top;background:#D2D7D5;">
		<%@ include file="../commonq/mymenu.jsp" %>
		</td>
		<td style="vertical-align:top;padding:20px;">
		<div align="center">
			<p>未付款订单：</p>
			<hr size="5px" color="gray">
			<s:iterator value="orders">
			 <table class="listTbl" id="shoppingCart">
		        <tr>
		          <th colspan="3" style="text-align:center">订单编号:<s:property value="id"/></th>
		          <th colspan="3" style="text-align:center">顾客信息:${sessionScope.user}</th>
		        </tr>
				<tr>
				    <td>商品编号</td>
					<td>商品图片</td>
					<td>商品名称</td>
					<td>商品价格</td>
					<td>购买数量</td>
					<td>操作</td>
				</tr>
				<s:iterator value="orderitems">
				<tr>
					<td><s:property value="product.productid"/></td>
					<td>
						<img style="height:80px" alt="<s:property value="product.productname"/>" src="/ssh/photo/product/<s:property value="product.photo"/>">
					</td>
					<td>
						<a href="qprodDetail.action?productid=<s:property value="product.productid"/>">
						<s:property value="product.productname"/>
						</a>
					</td>
					<td style="text-align:right;"><s:property value="product.nowprice"/></td>
					<td style="text-align:right;">
	                    <s:property value="count"/>
					</td>
					<td></td>
				</tr>
				</s:iterator>
				<tr>
				   <td colspan="4">总计:</td>
				   <td><s:property value="order.totalprice"/></td>
				   <td style="text-align:center;"><a href="delOrder.action?id=<s:property value="id" /> " onclick="return confirmDel('确定要删除整个订单吗')">删除</a></td>
				</tr>
			</table>
			</s:iterator>
			<br>
			<br>
			<br>			
			<p>已付款订单：</p>
			<hr size="5px" color="gray">
			<s:iterator value="orders2">
			 <table class="listTbl" id="shoppingCart">
		        <tr>
		          <th colspan="3" style="text-align:center">订单编号:<s:property value="id"/></th>
		          <th colspan="3" style="text-align:center">顾客信息:${sessionScope.user}</th>
		        </tr>
				<tr>
				    <td>商品编号</td>
					<td>商品图片</td>
					<td>商品名称</td>
					<td>商品价格</td>
					<td>购买数量</td>
					<td>操作</td>
				</tr>
				<s:iterator value="orderitems">
				<tr>
					<td><s:property value="product.productid"/></td>
					<td>
						<img style="height:80px" alt="<s:property value="product.productname"/>" src="/ssh/photo/product/<s:property value="product.photo"/>">
					</td>
					<td>
						<a href="qprodDetail.action?productid=<s:property value="product.productid"/>">
						<s:property value="product.productname"/>
						</a>
					</td>
					<td style="text-align:right;"><s:property value="product.nowprice"/></td>
					<td style="text-align:right;">
	                    <s:property value="count"/>
					</td>
					<td style="text-align:center;"><a href="toComment.action?productid=<s:property value="product.productid"/>"><input type="button" value="商品评价"></a></td>
				</tr>
				</s:iterator>
				<tr>
				   <td colspan="4"></td>
				   <td><s:property value="order.totalprice"/></td>
				   <td style="text-align:center;"><a href="delOrder.action?id=<s:property value="id" /> " onclick="return confirmDel('确定要删除整个订单吗')">删除</a></td>
				</tr>
			</table>
			</s:iterator>
			
			</div>
		</td>
	</tr>

</table>

<%@include file="../commonq/tail.jsp" %>
</body></html>